// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false;

/*引入axios*/
import Axios from 'axios'
Vue.prototype.axios = Axios;

//Axios.defaults.withCredentials = true;

// router.beforeEach(function (to,from,next) {
//   if(to.name=='add'){
//     let userid = localStorage.getItem('userid')
//       if(userid!=null){
//         next()
//
//       }else {
//         next('/')
//       }
//   }else {
//     next()
//   }
// })



import QS from 'qs'
Vue.prototype.qs = QS;
import HeyUI from 'heyui';
Vue.use(HeyUI);


new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  render: h => h(App)
})
